import requests


class RequestUtil:
    # 将session对象赋值给一个变量
    sess = requests.sessions.Session()

    # 定义一个公用的请求函数
    try:
        def sess_send_request(self, method, url, **kwargs):
            res = RequestUtil.sess.request(method, url, **kwargs)
            print("------------------------------------------")
            return res
    except BaseException as e:
        print("程序出现异常")
        print(e)
